#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace KLib.Physics.Collisions
{
    public class ArbiterList : List<Arbiter2>
    {
        #region Fields

        #endregion

        #region Properties

        #endregion

        #region Initialization

        public ArbiterList()
        {

        }

        #endregion

        #region Methods

        public void RemoveContactCountEqualsZero(Pool<Arbiter2> arbiterPool)
        {
            for (int i = 0; i < Count; i++)
            {
                if (ContactCountEqualsZero(this[i]))
                {
                    arbiterPool.Release(this[i]);
                    this.Remove(this[i]);
                }
            }
        }
        internal static bool ContactCountEqualsZero(Arbiter2 a)
        {
             return a.contactList.Count == 0;
        }
        #endregion

        #region Helper Methods

        #endregion
    }
}
